/*
 * @Author: your name
 * @Date: 2021-04-23 23:32:50
 * @LastEditTime: 2021-04-24 07:31:27
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \offer20k\项目代码\fantasticit\src\store\modules\Knowledgenotes.ts
 */
import { makeAutoObservable } from "mobx"
import { getKnowledge } from "@/services/index"
import { getKnowledgeId } from "@/services/index"
import { IKnowledgeChilrenList } from "@/util/knowledge";
class Knowledge {
    getPythonData() {
        throw new Error("Method not implemented.");
    }
    PythonData(PythonData: any): string {
        throw new Error("Method not implemented.");
    }
    constructor() {
        makeAutoObservable(this);
    }
    KnowledgeList = []
    KnowledgeChilrenList: IKnowledgeChilrenList = {} as IKnowledgeChilrenList
    KnowledgeChilrenHtmlList: any = {}
    async getKnowledge() {
        let result = await getKnowledge()
        if (result.statusCode == 200) {
            console.log(result)
            this.KnowledgeList = result.data;
        }
    }
    async getKnowledgeID(id: string) {
        let result = await getKnowledgeId(id)
        if (result.statusCode == 200) {
            console.log(result)
            this.KnowledgeChilrenList = result.data;
        }
    }
    async getKnowledgeIDID(id: string,) {
        let result = await getKnowledgeId(id)
        if (result.statusCode == 200) {
            this.KnowledgeChilrenHtmlList = result.data;
        }
    }
}

export default Knowledge;